.flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.wim {
  width: 160px;
  margin-right: 4px;
}

.nond {
  display: none;
}

.resource-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.resource-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 240px;
  max-height: 400px;
  overflow-y: auto;
}

.resource-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.resource-item.selected {
  border-color: #409eff;
}

.resource-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}

.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-size: 28px;
  border-radius: 4px;
}

.file-name {
  width: 100%;
  margin-top: 6px;
  overflow: hidden;
  font-size: 13px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.resource-actions {
  display: flex;
  gap: 8px;
}
